
public class SandwichBar {
  public int whichOrder(String[] available, String[] orders) {
  HashMap<String, Integer> avail_map = new HashMap<String, Integer>();
  
  for(String avail:available){
    if( !avail_map.containsKey(avail) )
      avail_map.put(avail, 1);
  }
      
      
  for ( int i = 0; i < orders.length; i++ ) {
    int count = 0;
    String[] strs;
    strs = orders[i].split(" ");
        
    for( int j = 0; j < strs.length; j++ ) {
      if(avail_map.containsKey(strs[j])){
      count++;
        }
        
    }
    if(count == strs.length)
    return i;
  }
  return -1;
  }
}